Skip to content

Enable sc:compile for stdlib package scala.jdk#25870

Merged
SolalPirelli merged 1 commit intoscala:mainfrom
artimahub:feature-sc-compile-scala-jdk
Apr 28, 2026
Merged

Enable sc:compile for stdlib package scala.jdk#25870
SolalPirelli merged 1 commit intoscala:mainfrom
artimahub:feature-sc-compile-scala-jdk

Conversation

@cheeseng
Copy link
Copy Markdown
Contributor

Added sc:compile to classes under scala.jdk package.

@cheeseng cheeseng requested a review from a team as a code owner April 20, 2026 08:18
Comment thread library/src/scala/jdk/Accumulator.scala Outdated
* assert(intAcc.nonEmpty)
* assert(anyAcc.nonEmpty)
* assert(intAcc2.nonEmpty)
* assert(anyAcc2.nonEmpty)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the assert(foo.nonEmpty) thing (here and elsewhere) feels odd and undesirable to me — this is a case where the non-REPL-style version has lost information that existed in the original REPL-style version

in any particular example, I think a decision needs to be made whether showing or checking the result is important, or unimportant. if it's unimportant enough, the asserts can be omitted. if it's actually important, some other way to demonstrate the behavior is needed, whether it's a comment showing the result, or a more powerful assert, or whatever

* import scala.jdk.CollectionConverters._
* val s: java.util.Set[String] = Set("one", "two").asJava
* ```scala sc:compile
* import scala.jdk.CollectionConverters._
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use Scala style 3 wildcard imports (foo.*) everywhere rather than Scala 2 style (foo._)

@cheeseng cheeseng force-pushed the feature-sc-compile-scala-jdk branch 2 times, most recently from d0fcc8f to eec7ed6 Compare April 25, 2026 03:36
@cheeseng cheeseng force-pushed the feature-sc-compile-scala-jdk branch from eec7ed6 to 2c50192 Compare April 25, 2026 06:48
@cheeseng
Copy link
Copy Markdown
Contributor Author

@SethTisue Do you mind to review again to see if it is fit enough for merging?

Thanks.

@SolalPirelli SolalPirelli merged commit 659d879 into scala:main Apr 28, 2026
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants